cmake_minimum_required(VERSION 3.5)
project(champ_teleop)

find_package(ament_cmake REQUIRED)

if(NOT DEFINED CMAKE_SUPPRESS_DEVELOPER_WARNINGS)
     set(CMAKE_SUPPRESS_DEVELOPER_WARNINGS 1 CACHE INTERNAL "No dev warnings")
endif()

include(./.r2r/r2r_cargo.cmake)

# put ros package dependencies here.
r2r_cargo(rcl                    # we need the c ros2 api
          rcl_action             # as of r2r 0.1.0, we also need the action api
          rcl_interfaces         # our custom message types as follows
          std_msgs
          geometry_msgs
          champ_msgs
         )

# install binaries
if(WIN32)
  set(SUFFIX ".exe")
else()
  set(SUFFIX "")
endif()

install(PROGRAMS
  ${CMAKE_SOURCE_DIR}/target/colcon/keyboard_teleop${SUFFIX}
  DESTINATION lib/${PROJECT_NAME}
)

install(DIRECTORY launch/
  DESTINATION share/${PROJECT_NAME}/launch
)

# we need this for ros/colcon
ament_package()